import common from "shared/component/common/common"
import { CharacterState } from "shared/enums/CharacterState"

/**
 * 触发器状态
 */
export const triggerStateConfig: {
    [key in keyof clazz.Instances]?: {
        /** 触发器状态 */
        state: CharacterState
        /** 触发器成功测试 */
        test: (part: BasePart) => boolean | undefined
    }
} = {
    WallHeader: {
        state: CharacterState.WallHeaderClimb,
        test: (part: BasePart) => (part.Name === "Head" && part.Parent?.IsA('Model')
            && common.isLocalPlayerCharacter(part.Parent))
    }
}
